<template>
    <div>
        孙子组件的inject  {{activeKey}}
    </div>
</template>

<script>
import { defineComponent, inject } from "vue";

export default defineComponent({
    setup(){
        const activeKey = inject('activeKey', '1')
        return{
            activeKey
        }
    }
})
</script>